using DA.AnimGraph;
using UnityEngine.UIElements;


namespace DA.AnimGraph.Editor {

    internal class InspectorField_Bool : InspectorField<RefField<bool>> {

        Toggle boolField;

        protected override void BuildUI() {
            boolField = new Toggle(labelText);
            boolField.value = source.value;
            boolField.RegisterValueChangedCallback(evt => {
                source.value = evt.newValue;
                inspectorChangeCallback?.Invoke();
            });
        }

        protected override void DrawUI() {
            Add(boolField);
        }

    }

}
